package com.easemob.chat;

import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import com.easemob.util.EMLog;
import java.io.File;

public class VoiceMessageBody extends FileMessageBody
  implements Parcelable
{
  int length = 0;
  public static final Parcelable.Creator<VoiceMessageBody> CREATOR = new Parcelable.Creator()
  {
    public VoiceMessageBody createFromParcel(Parcel paramAnonymousParcel)
    {
      return new VoiceMessageBody(paramAnonymousParcel, null);
    }

    public VoiceMessageBody[] newArray(int paramAnonymousInt)
    {
      return new VoiceMessageBody[paramAnonymousInt];
    }
  };

  public VoiceMessageBody(File paramFile, int paramInt)
  {
    this.localUrl = paramFile.getAbsolutePath();
    this.fileName = paramFile.getName();
    this.length = paramInt;
    EMLog.d("voicemsg", "create voice, message body for:" + paramFile.getAbsolutePath());
  }

  VoiceMessageBody(String paramString1, String paramString2, int paramInt)
  {
    this.fileName = paramString1;
    this.remoteUrl = paramString2;
    this.length = paramInt;
  }

  public int getLength()
  {
    return this.length;
  }

  public String toString()
  {
    return "voice:" + this.fileName + ",localurl:" + this.localUrl + ",remoteurl:" + this.remoteUrl + ",length:" + this.length;
  }

  public int describeContents()
  {
    return 0;
  }

  public void writeToParcel(Parcel paramParcel, int paramInt)
  {
    paramParcel.writeString(this.fileName);
    paramParcel.writeString(this.localUrl);
    paramParcel.writeString(this.remoteUrl);
    paramParcel.writeInt(this.length);
  }

  private VoiceMessageBody(Parcel paramParcel)
  {
    this.fileName = paramParcel.readString();
    this.localUrl = paramParcel.readString();
    this.remoteUrl = paramParcel.readString();
    this.length = paramParcel.readInt();
  }
}

/* Location:           D:\hygieia\userclient\common\libs\easemobchat_2.1.8.jar
 * Qualified Name:     com.easemob.chat.VoiceMessageBody
 * JD-Core Version:    0.6.1
 */